|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.vtp.framework.interactions.core.support.Widget
org.eclipse.vtp.framework.interactions.voice.vxml.Dialog
org.eclipse.vtp.framework.interactions.voice.vxml.Menu
public class Menu
The Menu class represents the <menu> VXML element. A
menu is the counterpart to the form element. Instead of the free-form nature
of the form's field element, a menu provides a set of choices that are
typically selected with a single digit entry.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
Menu(java.lang.String id,
Prompt prompt)
Creates a new instance of Menu with the specified identifier
and opening prompt. |
|
Menu(java.lang.String id,
java.lang.String scope,
Prompt prompt)
Creates a new instance of Menu with the specified
identifier, scope, and opening prompt. |
|
| Method Summary | |
|---|---|
void |
addChoice(Choice choice)
Adds the specified choice to this menu. |
Prompt |
getPrompt()
Returns the opening prompt played to the caller. |
void |
removeChoice(Choice choice)
Removes the specified choice from this menu. |
void |
setPrompt(Prompt prompt)
Sets the opening prompt to play to the caller. |
protected void |
writeChoices(org.xml.sax.ContentHandler outputHandler)
Write the choices in this menu to the specified content handler. |
protected void |
writePrompt(org.xml.sax.ContentHandler outputHandler)
Writes this menu's prompt to the specified content handler. |
void |
writeWidget(org.xml.sax.ContentHandler outputHandler)
Writes the content of this widget to an XML content handler. |
| Methods inherited from class org.eclipse.vtp.framework.interactions.voice.vxml.Dialog |
|---|
addEventHandler, clearProperty, getID, getPropertyNames, getPropertyValue, getScope, removeEventHandler, setID, setProperty, setScope, writeAttributes, writeEventHandlers, writeProperties |
| Methods inherited from class org.eclipse.vtp.framework.interactions.core.support.Widget |
|---|
toString, writeAttribute, writeChildren, writeChildren, writeWidget, writeWidget |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Menu(java.lang.String id,
Prompt prompt)
throws java.lang.IllegalArgumentException,
java.lang.NullPointerException
Menu with the specified identifier
and opening prompt. The set of properties and choices are initially empty.
Throws an IllegalArgumentException if the prompt argument is
null.
id - See documentation of the Dialog element.prompt - The opening prompt.
java.lang.IllegalArgumentException - If the supplied ID is empty.
java.lang.NullPointerException - If the supplied ID is null.
java.lang.NullPointerException - If the supplied prompt is null.
public Menu(java.lang.String id,
java.lang.String scope,
Prompt prompt)
throws java.lang.IllegalArgumentException,
java.lang.NullPointerException
Menu with the specified
identifier, scope, and opening prompt. The set of properties and choices
are initially empty. Throws an IllegalArgumentException if the prompt
argument is null.
id - See documentation of the Dialog elementscope - See documentation of the Dialog elementprompt - The opening prompt.
java.lang.IllegalArgumentException - If the supplied ID is empty.
java.lang.IllegalArgumentException - If the supplied scope is invalid.
java.lang.NullPointerException - If the supplied ID is null.
java.lang.NullPointerException - If the supplied scope is null.
java.lang.NullPointerException - If the supplied prompt is null.| Method Detail |
|---|
public Prompt getPrompt()
public void setPrompt(Prompt prompt)
throws java.lang.NullPointerException
prompt - The opening prompt.
java.lang.NullPointerException - If the supplied prompt is null.
public void addChoice(Choice choice)
throws java.lang.NullPointerException
choice - The choice to add.
java.lang.NullPointerException - If the supplied choice is null.
public void removeChoice(Choice choice)
throws java.lang.NullPointerException
choice - The choice to remove.
java.lang.NullPointerException - If the supplied choice is null.
public void writeWidget(org.xml.sax.ContentHandler outputHandler)
throws java.lang.NullPointerException,
org.xml.sax.SAXException
Widget
writeWidget in class WidgetoutputHandler - The handler to write this widget to.
java.lang.NullPointerException - If the supplied content handler is
null.
org.xml.sax.SAXException - If the writing of this widget fails.
protected void writePrompt(org.xml.sax.ContentHandler outputHandler)
throws java.lang.NullPointerException,
org.xml.sax.SAXException
outputHandler - The handler to write the prompt to.
org.xml.sax.SAXException - If the writing of the prompt fails.
java.lang.NullPointerException - If the supplied content handler is
null.
protected void writeChoices(org.xml.sax.ContentHandler outputHandler)
throws java.lang.NullPointerException,
org.xml.sax.SAXException
outputHandler - The content handler to write to.
java.lang.NullPointerException - If the supplied content handler is
null.
org.xml.sax.SAXException - If the writing of one of the choices fails.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||